package com.dynamic.mybatis.core.intercept;

import com.dynamic.mybatis.core.datasource.DataSourceProperty;

import javax.sql.DataSource;
import java.util.Map;

public interface DynamicDataSourceHandler {
    enum OPERATE {
        ADD,
        UPDATE,
        DELETE
    }

    void before(OPERATE operate, Object dataSourceKey, DataSource dataSource, DataSourceProperty property, Map<Object, Object> attributes);

    void after(OPERATE operate, Object dataSourceKey, DataSource dataSource, DataSourceProperty property, Map<Object, Object> attributes);
}
